package com.yanqu.road.entity.kuang.battle;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_kuang_battle_place_data")
public class CrossKuangBattlePlaceData extends DataObject {

    @FieldTypeAnnotation(desc = "周次id", select = true, update = true)
    private int weekId;

    @FieldTypeAnnotation(desc = "分组id", select = true, update = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "宝地id", select = true, update = true)
    private int placeId;

    @FieldTypeAnnotation(desc = "占领的宗门")
    private int campId;

    @FieldTypeAnnotation(desc = "占领时间")
    private long seizeTime;

    @FieldTypeAnnotation(desc = "占领最后产出时间")
    private long lastSeizeRewardTime;

    @FieldTypeAnnotation(desc = "更新时间")
    private long updateTime;

    @FieldTypeAnnotation(desc = "宗门占领信息")
    private Map<Integer, CrossKuangBattlePlaceSeizeInfo> seizeInfoMap = new ConcurrentHashMap<>();

    @FieldTypeAnnotation(desc = "最后抢占宗门")
    private int lastSeizeCampId;

    @FieldTypeAnnotation(desc = "上次推送持续占领公告时间")
    private long lastNoticeSeizeTime;

    public CrossKuangBattlePlaceData() {

    }

    public int getWeekId() {
        return weekId;
    }
    public void setWeekId(int weekId) {
        if (this.weekId != weekId) {
            this.weekId = weekId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }
    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getPlaceId() {
        return placeId;
    }
    public void setPlaceId(int placeId) {
        if (this.placeId != placeId) {
            this.placeId = placeId;
            setOp(DataStatus.Update);
        }
    }

    public int getCampId() {
        return campId;
    }
    public void setCampId(int campId) {
        if (this.campId != campId) {
            this.campId = campId;
            setOp(DataStatus.Update);
        }
    }

    public long getSeizeTime() {
        return seizeTime;
    }
    public void setSeizeTime(long seizeTime) {
        if (this.seizeTime != seizeTime) {
            this.seizeTime = seizeTime;
            setOp(DataStatus.Update);
        }
    }

    public long getLastSeizeRewardTime() {
        return lastSeizeRewardTime;
    }
    public void setLastSeizeRewardTime(long lastSeizeRewardTime) {
        if (this.lastSeizeRewardTime != lastSeizeRewardTime) {
            this.lastSeizeRewardTime = lastSeizeRewardTime;
            setOp(DataStatus.Update);
        }
    }

    public long getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(long updateTime) {
        if (this.updateTime != updateTime) {
            this.updateTime = updateTime;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, com.yanqu.road.entity.kuang.battle.CrossKuangBattlePlaceSeizeInfo> getSeizeInfoMap() {
        return seizeInfoMap;
    }
    public void setSeizeInfoMap(java.util.Map<java.lang.Integer, com.yanqu.road.entity.kuang.battle.CrossKuangBattlePlaceSeizeInfo> seizeInfoMap) {
        if (null == seizeInfoMap){
            return;
        }
        if (this.seizeInfoMap == null || !this.seizeInfoMap.equals(seizeInfoMap)) {
            this.seizeInfoMap = seizeInfoMap;
            setOp(DataStatus.Update);
        }
    }

    public int getLastSeizeCampId() {
        return lastSeizeCampId;
    }
    public void setLastSeizeCampId(int lastSeizeCampId) {
        if (this.lastSeizeCampId != lastSeizeCampId) {
            this.lastSeizeCampId = lastSeizeCampId;
            setOp(DataStatus.Update);
        }
    }

    public long getLastNoticeSeizeTime() {
        return lastNoticeSeizeTime;
    }
    public void setLastNoticeSeizeTime(long lastNoticeSeizeTime) {
        if (this.lastNoticeSeizeTime != lastNoticeSeizeTime) {
            this.lastNoticeSeizeTime = lastNoticeSeizeTime;
            setOp(DataStatus.Update);
        }
    }
}
